﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site1.Master" AutoEventWireup="true" CodeBehind="ProductUI.aspx.cs" Inherits="RBOSS.WebUI.ProductUI" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <style type="text/css">
        .auto-style1 {
            height: 30px;
        }
        .center_content{
            width:900px;
        }

        
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div class="center_title_bar" style="margin-bottom:10px;">Product Upload</div>
    <asp:PlaceHolder runat="server" ID="ErrorMessage" Visible="false">
                        <p class="text-danger">
                            <asp:Literal runat="server" ID="StatusText" />
                        </p>
    </asp:PlaceHolder>
    <table style="padding:8px; margin:0px;">
        <tr class="GUITable">
            <td class="GUITable" ><asp:Label ID="lblProdName" runat="server" Text="Product Name" CssClass="contact"></asp:Label>:
            </td>
            <td class="GUITable"><asp:TextBox ID="txtProdName" runat="server" CssClass="contact_input"></asp:TextBox></td>
            <td style="color:red;">
                <asp:RequiredFieldValidator runat="server"  ValidationGroup="AddProduct"
                    ErrorMessage="Product Name is Required!" 
                    ControlToValidate="txtProdName">
                    </asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr class="GUITable">
            <td class="GUITable"><asp:Label ID="lblPrice" runat="server" CssClass="contact" Text="Unit Price"></asp:Label>:
            </td>
            <td class="GUITable"><asp:TextBox ID="txtPrice" runat="server" CssClass="contact_input"></asp:TextBox></td>
            <td style="color:red;">
                <asp:RequiredFieldValidator runat="server"   ValidationGroup="AddProduct"
                    ErrorMessage="Unit Price is Required!" 
                    ControlToValidate="txtPrice">
                    </asp:RequiredFieldValidator>
            </td>
            <td style="color:red;">
                <asp:RegularExpressionValidator ID="RegularExpressionValidator3" runat="server"   ValidationGroup="AddProduct"
                ErrorMessage="Must enter decimal with at most 4 precision" ForeColor="Red" ControlToValidate="txtPrice"
                ValidationExpression="(?!^0*$)(?!^0*\.0*$)^\d{1,18}(\.\d{1,4})?$"></asp:RegularExpressionValidator>
            </td>
        </tr>
        <tr class="GUITable">
            <td class="GUITable"><asp:Label ID="lblQuantity" runat="server" CssClass="contact" Text="Quantity"></asp:Label>:
            </td>
            <td class="GUITable"><asp:TextBox ID="txtQuantity" runat="server" CssClass="contact_input"></asp:TextBox></td>
            <td style="color:red;">
                <asp:RequiredFieldValidator runat="server"   ValidationGroup="AddProduct"
                    ErrorMessage="Product Quantity is Required!" 
                    ControlToValidate="txtQuantity">
                    </asp:RequiredFieldValidator>
            </td>
            <td style="color:red;">
                <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server"   ValidationGroup="AddProduct"
                ErrorMessage="Enter digits only" ForeColor="Red" ControlToValidate="txtQuantity"
                ValidationExpression="^[0-9]+$"></asp:RegularExpressionValidator>
            </td>
        </tr>
        <tr class="GUITable">
            <td class="GUITable"><asp:Label ID="lblImage" runat="server" CssClass="contact" Text="Product Image"></asp:Label>:
            </td>
            <td class ="GUITable"><asp:FileUpload ID="fileupload" runat="server" OnDataBinding="btnImgageBrowse_Click" /></td>
       </tr>
        <tr class =" GUITable">
            <td class="GUITable">
                <asp:Label ID="lblCategory" runat="server" Text="Select Category" CssClass="contact"></asp:Label>:</td>
            <td class="GUITable"> <asp:DropDownList ID="ddlCategory" runat="server" Width="159px"></asp:DropDownList></td>
        </tr>
        <tr class="GUITable"><td></td><td class="GUITable"> <asp:CheckBox ID="chkProductAvailable" runat="server" Text ="Product Available" Checked="True"/></td></tr>
        <tr class="GUITable"><td> <asp:Label ID="lblDescription" runat="server" Text="Description"></asp:Label>:</td>
        <td class="GUITable"><asp:TextBox ID="txtDescription" runat="server" Height="60px" CssClass="contact_textarea" TextMode="MultiLine" Width="264px"></asp:TextBox></td></tr>
        
         <tr  class="GUITable">
             <td></td>
            <td class="GUITable" ><asp:Button ID="btnInsert" runat="server" Text="Insert"  ValidationGroup="AddProduct" CssClass="bigGreenButton" OnClick="btnInsert_Click" />
            </td>
            
        </tr>
    </table>
    
   

</asp:Content>
